<section>

  <!-- main content start-->
  <div class="main-content" >

    <div class="panel-body" style="margin-bottom: -15px;">
      <!--<span>-->
      <!--<i class="fa  fa-2x fa-save"></i>-->
      <!--</span>-->
    </div>

    <!--body wrapper start-->
    <div class="wrapper">

      <div class="row" style="margin-top: 10px;">
        <div class="col-md-12">
          <section class="panel">
            <header class="panel-heading">
              车辆类型
            </header>

            <form [formGroup]="typeForm">
              <div class="panel-body">
                <div class="col-lg-6">
                  <div class="form-group">
                    <label  ><span class="necessary">*</span>类型代号&nbsp;</label>
                    <input [readonly]="statusFlag"  formControlName="id" type="text" class="form-control " id="typeID" (blur)="toSearchId()"/>
                  </div>
                </div>
                <div class="col-lg-6">
                  <div class="form-group">
                    <label  ><span class="necessary">*</span>类型名称&nbsp;</label>
                    <input  formControlName="name" class="form-control" type="text" id="typeName" />
                  </div>
                </div>
                <div class="col-lg-12">
                  <div class="form-group" >
                    <label  >说明</label>
                    <textarea  formControlName="description" class="form-control textareastyle" id="typeDescription" ></textarea>
                  </div>
                </div>
              </div>


              <div class="panel-body">
                <div class="form-group">
                  <div class="pull-right" style=" margin-top: 30px;">
                    <button class="btn btn-primary" type="button" [disabled]="!btnDisabled" (click)="updateInfo(typeForm.value)">修改</button>
                    <button class="btn btn-default" type="button" [disabled]="btnDisabled" (click)="onSubmit(typeForm.value)">新增</button>
                    <button class="btn btn-default" type="button" [disabled]="!btnDisabled" (click)="delType()">删除</button>
                    <button class="btn btn-default" type="button" (click)="clear()">清空</button>
                  </div>
                </div>
              </div>
            </form>
          </section>
        </div>
      </div>



      <!--<div class="panel-body">-->

        <form action="#" class="form-horizontal ">

          <div>

            <div class="input-group m-bot15" >

              <input class="form-control" placeholder="类型名称" type="text" style="  margin-left: 75%;width: 25%; " [formControl]="searchParam" id="searchpa">
              <span class="input-group-btn">
                <button type="button" class="btn btn-default" (click)="searchInfo()"><i class="fa fa-search"></i></button>
              </span>
            </div>

          </div>
          <nz-table #vehicleTable
                    [nzBordered]="true"
                    [nzDataSource]="_dataSet"
                    [nzShowSizeChanger]="true"
                    [nzTotal]="_total"
                    [(nzPageIndex)]="_current"
                    (nzPageIndexChange)="refreshData()"
                    [(nzPageSize)]="_pageSize"
                    (nzPageSizeChange)="refreshData(true)"
                    (nzDataChange)="vehicleDisplayDataChange($event)">
              <thead nz-thead>
              <tr>
                <th class="table-header" nz-th [nzWidth]="'25%'">
                  <span>类型代号</span>
                </th>
                <th class="table-header" nz-th [nzWidth]="'25%'">
                  <span>类型名称</span>
                </th>
                <th class="table-header" nz-th [nzWidth]="'50%'">
                  <span>说明</span>
                </th>
                <!--<th class="table-header" nz-th [nzWidth]="'5%'">-->
                  <!--<span>删除</span>-->
                <!--</th>-->
              </tr>
              </thead>
            <tbody nz-tbody>
            <tr nz-tbody-tr *ngFor="let data of vehicleTable.data" [class.selected]="data === selected">
              <td nz-td (click)="onSelect(data)" >{{data.id}}</td>
              <td nz-td (click)="onSelect(data)" >{{data.name}}</td>
              <td nz-td (click)="onSelect(data)" >{{data.description}}</td>
              <!--<td nz-td><i class="fa fa-times" aria-hidden="true" style="color:#424F63;" (click)="delType(data)"></i></td>-->
            </tr>
            </tbody>
          </nz-table>

        </form>
      <!--</div>-->
    </div>


    <!--body wrapper end-->




  </div>
  <!-- main content end-->
</section>
